﻿using AutoMapper;
using LiveShopvnext.Books;
using LiveShopvnext.Categorys;
using LiveShopvnext.Commodity;

namespace LiveShopvnext
{
    public class LiveShopvnextApplicationAutoMapperProfile : Profile
    {
        public LiveShopvnextApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */

            //测试
            CreateMap<Book, BookDto>();
            CreateMap<CreateUpdateBookDto, Book>();

            //产品
            CreateMap<Commodity.Product, ProductDto>();
            CreateMap<CreateUpdateProductDto, Commodity.Product>();

            //产品分类
            CreateMap<Commodity.Category, CategoryDto>();
            CreateMap<CreateUpdateCategoryDto, Commodity.Category>();
        }
    }
}
